package beans.lifecycle;

import cn.stimd.spring.beans.factory.InitializingBean;

import javax.annotation.PostConstruct;

/**
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
public class MyInitBean implements InitializingBean {

    @PostConstruct
    private void init(){
        System.out.println("初始化 @PostConstruct 注解方法...");
    }


    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("初始化 InitializingBean 接口方法...");
    }


    public void customInit(){
        System.out.println("初始化自定义 init 方法...");
    }
}
